<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models\Shop;

use App\Models\Base;
use Carbon\Carbon;

/**
 * Class Good
 *
 * @property int $id
 * @property string $name
 * @property float $original_price
 * @property float $sell_price
 * @property int $sell_number
 * @property string $info
 * @property string $cover_img
 * @property int $is_assemble
 * @property int $start_time
 * @property int $ent_time
 * @property Carbon $created_at
 * @property Carbon $updated_at
 *
 * @package App\Models
 */
class Good extends Base
{
    protected $table = 'goods';

    protected $casts = [
        'class_id' => 'int',
        'original_price' => 'float',
        'sell_price' => 'float',
        'sell_number' => 'int',
        'info_images' => 'json',
        'loop_images' => 'json',
        'is_assemble' => 'int',
        'start_time' => 'int',
        'ent_time' => 'int',
        'on_sale' => 'bool',
        'attribute_list' => 'json'
    ];

    protected $fillable = [
        'name',
        'class_id',
        'original_price',
        'sell_price',
        'sell_number',
        'info_images',
        'loop_images',
        'cover_img',
        'is_assemble',
        'start_time',
        'ent_time',
        'on_sale',
        'attribute_list'
    ];
}
